from django.http import HttpRequest
from register.models import Player
def getEmail(request:HttpRequest):
    Email=None
    try:
        Email=request.COOKIES['email']
    except:
        pass
    if Email!=None and len(Player.objects.filter(email=Email))==0:
        Email=None
    return Email
    